class Animal {
	void cry (){
		
	}
}
class Dog extends Animal{
	void cry () {
		System.out.println("Wang Wang....");
		
	}
}
class Cat extends Animal{
	void cry (){
	System.out.println("Miao Miao....");	
	}
}
public class Test{
	public static void main (String args[]){
		Animal animal;
		animal = new Dog();
		animal.cry();
		animal = new Cat();
		animal.cry();
		
	}
}